﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Benchmark_System {
    /// <summary>
    /// Logger class writing to console
    /// </summary>
    class LoggerConsole {

        public void Subscribe(BenchmarkSystem bms) {
            bms.JobSubmitted += OnJobSubmitted;
            bms.JobCancelled += OnJobCancelled;
            bms.JobRunning += OnJobRunning;
            bms.JobTerminated += OnJobTerminated;
            bms.JobFailed += OnJobFailed;
        }

        internal void OnJobSubmitted(object sender, EventArgs ea) {
            Console.WriteLine("Job submitted");
        }

        internal void OnJobCancelled(object sender, EventArgs ea) {
            Console.WriteLine("Job cancelled");
        }

        internal void OnJobRunning(object sender, EventArgs ea) {
            Console.WriteLine("Job running");
        }

        internal void OnJobTerminated(object sender, EventArgs ea) {
            Console.WriteLine("Job terminated");
        }

        internal void OnJobFailed(object sender, EventArgs ea) {
            Console.WriteLine("Job failed");
        }
    }
}
